package com.cqw.commontest.thread.unit2;

/**
 * @Author: caoqingwen
 * @CreateTime: 2021-06-04 10:30
 * @Description:
 */
public class Test2 {

    public static void main(String[] args) {
        new Thread(new Music()).start();
    }


}


class Game implements Runnable {
    @Override
    public void run() {
        while (true) {
            System.out.println("打游戏");
        }
    }
}

class Music implements Runnable {

    @Override
    public void run() {
        while (true) {
            System.out.println("听音乐");
        }
    }
}